// Main.cpp is a part of the PACIAE event generator.
// Copyright (C) 2025 PACIAE Group.
// PACIAE is licensed under the GNU GPL v2 or later, see LICENCE for details.
// Author: An-Ke Lei, January 2024 - February 2025.

// This is the C++ main program for PACIAE.

//                                               By An-Ke at CCNU on 29/02/2024
//                                          Last updated by An-Ke on 07/02/2025

// PACIAE header files.
#include "Paciae.hpp"

int main() {

  // Paciae paciae;
  // Settings& settings = paciae.settings;

    // Calls PACIAE4 Fortran program.
    main_40( );

    return 0;
}

//--------------------------------------------------------------------------

  // Specifies output target file, i.e. "cout" redirection.

void redirectCout( string& outFile ) {
  std::streambuf* coutBuff = std::cout.rdbuf();
  std::ofstream outputFile;
  outputFile.open( outFile, ios::out | ios::app );
  std::streambuf* fileBuff = outputFile.rdbuf();
  std::cout.rdbuf( fileBuff );
  // Recovers std::cout.
  // std::cout.rdbuf( coutBuff );
}
